<template xmlns:el-col="http://www.w3.org/1999/html">
    <el-form ref="contentForm" :model="contentForm" :rules="contentFormRules" label-width="100px">
        <el-form-item label="运动类型" prop="preActionType" >
            <el-radio-group disabled v-model="contentForm.preActionType" style="width: 60%">
                <el-radio  :label="'00'">主动运动</el-radio>
                <el-radio  :label="'01'">被动运动</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="是否电刺激" prop="preActionElectricalStatus" >
            <el-radio-group disabled v-model="contentForm.preActionElectricalStatus" style="width: 50%">
                <el-radio :label="'01'">是</el-radio>
                <el-radio :label="'00'">否</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item v-if="contentForm.preActionElectricalStatus ==1" label="刺激类型" prop="preActionElectrical">
            <el-radio-group disabled v-model="contentForm.preActionElectrical" style="width: 100%">
                <el-radio  :label="'02'">方波</el-radio>
                <el-radio  :label="'03'">三角波</el-radio>
                <el-radio  :label="'04'">梯形波</el-radio>
                <el-radio  :label="'05'">锯齿波</el-radio>
            </el-radio-group>
        </el-form-item>
<!--        <el-form-item   v-if="contentForm.preActionElectricalStatus =='01'" label="幅度值" prop="preActionAmplitude" >-->
<!--            <el-input readonly v-model="contentForm.preActionAmplitude" style="width: 40%"></el-input>-->
<!--        </el-form-item>-->
        <el-form-item   v-if="contentForm.preActionType =='01'" label="左脚运动速度" prop="preActionLeftSpeed" >
            <el-input  readonly type="number" readonly v-model="contentForm.preActionLeftSpeed" style="width: 40%"></el-input>
        </el-form-item>
        <el-form-item   v-if="contentForm.preActionType =='01'" label="右脚运动速度" prop="preActionRightSpeed" >
            <el-input readonly type="number" v-model="contentForm.preActionRightSpeed" style="width: 40%"></el-input>
        </el-form-item>
        <el-form-item  label="痉挛值" prop="preActionSpasm" >
            <el-input readonly type="number" v-model="contentForm.preActionSpasm" :min="1" style="width: 20%"></el-input> 级(1,2,3)
        </el-form-item>
        <el-form-item  label="运动时间" prop="preActionTime" >
            <el-input readonly v-model="contentForm.preActionTime" style="width: 40%"></el-input> 分钟
        </el-form-item>
    </el-form>
</template>

<script>
    export default {
        name: 'patient',
        props:['contentForm'],
        data() {
            return {
                contentFormRules:{
                    preActionType: [
                        { required: true, message: '请选择运动类型', trigger: 'blur' },
                    ],
                    preActionElectricalStatus: [
                        { required: true, message: '请选择', trigger: 'blur' },
                    ],
                    preActionSpasm: [
                        { required: true, message: '请输入痉挛值', trigger: 'blur' }
                    ],
                    preActionTime: [
                        { required: true, message: '请输入运动时间', trigger: 'blur' }
                    ],
                }
            }
        },

        methods: {
        },
        watch:{     //监听value的变化，进行相应的操作即可
            contentForm: function(a,b){     //a是value的新值，b是旧值
               this.contentForm=a;
            }
        }
    };
</script>
<style scoped>
</style>
